import React from "react";
import { ButtonProps } from "./Button.types";
import "./Button.css";

const Button: React.FC<ButtonProps> = ({
  type = "button",
  size = "medium",
  variant = "primary",
  disabled = false,
  onClick,
  children,
  ...rest
}) => {
  return (
    <button
      type={type}
      className={`btn btn-${variant} btn-${size}`}
      disabled={disabled}
      onClick={onClick}
      {...rest}
    >
      {children}
    </button>
  );
};

export default Button;
